@alwith/module-chat 0.6.22 → 0.6.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-host.js +1 -1
  3. package/dist/agent/application-client.js +1 -1
  4. package/dist/agent/client.js +1 -1
  5. package/dist/agent/custom-model-effort.js +1 -1
  6. package/dist/agent/fork-title.js +1 -1
  7. package/dist/agent/image-request.js +1 -1
  8. package/dist/agent/image-tools.js +1 -1
  9. package/dist/agent/input-config.js +1 -1
  10. package/dist/agent/input-modes/chat.js +1 -1
  11. package/dist/agent/input-modes/execution-meta.js +1 -1
  12. package/dist/agent/input-modes/image-context.js +1 -1
  13. package/dist/agent/input-modes/image.js +1 -1
  14. package/dist/agent/input-modes/index.js +1 -1
  15. package/dist/agent/project-path.js +1 -1
  16. package/dist/agent/request-error.js +1 -1
  17. package/dist/agent/session-list-refresh.js +1 -1
  18. package/dist/app-reference.js +1 -1
  19. package/dist/application-tools.js +1 -1
  20. package/dist/approval/choice-elicitation-form.js +1 -1
  21. package/dist/approval/choice-schema.js +1 -1
  22. package/dist/approval/permission-options.js +1 -1
  23. package/dist/approval/permission-view.js +1 -1
  24. package/dist/approval/schema-elicitation-form.js +1 -1
  25. package/dist/approval/url-elicitation-card.js +1 -1
  26. package/dist/chunk-0myf2ak0.js +2 -0
  27. package/dist/{chunk-9ys14ex1.js → chunk-0ne2mz2q.js} +3 -3
  28. package/dist/{chunk-5r5dc363.js → chunk-0xshzqb6.js} +2 -2
  29. package/dist/{chunk-2b7fjev1.js → chunk-11vn501z.js} +2 -2
  30. package/dist/{chunk-vtw1zmyd.js → chunk-1e83qr49.js} +2 -2
  31. package/dist/{chunk-6j2q7qvk.js → chunk-1pb43y89.js} +2 -2
  32. package/dist/{chunk-nrk4aa7a.js → chunk-1rwkdezk.js} +2 -2
  33. package/dist/chunk-1smyy9mt.js +2 -0
  34. package/dist/{chunk-t3enrsnt.js → chunk-26w51q10.js} +2 -2
  35. package/dist/{chunk-rcfjwyt4.js → chunk-2cc8d35c.js} +1 -1
  36. package/dist/{chunk-qbt8ahwr.js → chunk-2fx3qhyb.js} +2 -2
  37. package/dist/chunk-2q1xxs3t.js +2 -0
  38. package/dist/{chunk-tp7329ny.js → chunk-2qs1ss40.js} +2 -2
  39. package/dist/{chunk-127rz9fe.js → chunk-2sc2z6g5.js} +2 -2
  40. package/dist/chunk-36ttr22w.js +2 -0
  41. package/dist/{chunk-fdmtynmq.js → chunk-3a5sn0v8.js} +2 -2
  42. package/dist/chunk-3mm1d99e.js +2 -0
  43. package/dist/chunk-3qwtda21.js +3 -0
  44. package/dist/{chunk-jv117dry.js → chunk-3z5zyra7.js} +2 -2
  45. package/dist/{chunk-cc8cg69z.js → chunk-3zae491f.js} +4 -4
  46. package/dist/{chunk-xnj05nc3.js → chunk-4fmn1kk4.js} +3 -3
  47. package/dist/chunk-4gxpna3p.js +2 -0
  48. package/dist/{chunk-fgec4g5x.js → chunk-4h9ee02f.js} +2 -2
  49. package/dist/{chunk-71fhan3p.js → chunk-4ntxjy8v.js} +2 -2
  50. package/dist/{chunk-ehp3p3t5.js → chunk-4r0ffb0s.js} +2 -2
  51. package/dist/{chunk-7ekex790.js → chunk-50eym2q3.js} +3 -3
  52. package/dist/{chunk-05eftctr.js → chunk-542c9tpr.js} +2 -2
  53. package/dist/chunk-5d138vq3.js +1 -0
  54. package/dist/{chunk-gzf6kzm0.js → chunk-5kje89r8.js} +2 -2
  55. package/dist/{chunk-00vd1yaz.js → chunk-5pmr5dby.js} +2 -2
  56. package/dist/chunk-5ryfm4ka.js +4 -0
  57. package/dist/{chunk-7n1v87h0.js → chunk-5xe89qwh.js} +2 -2
  58. package/dist/{chunk-2w0grrzz.js → chunk-6cjjwry2.js} +2 -2
  59. package/dist/{chunk-b1yfr8gv.js → chunk-6r5nzsw8.js} +2 -2
  60. package/dist/{chunk-cbx30sf1.js → chunk-6tvq472s.js} +2 -2
  61. package/dist/{chunk-dav36sjv.js → chunk-6vdayg6w.js} +2 -2
  62. package/dist/{chunk-y3e10q18.js → chunk-6w8p1hwb.js} +2 -2
  63. package/dist/{chunk-shk5mmmw.js → chunk-73541c5k.js} +2 -2
  64. package/dist/{chunk-xde2hdrb.js → chunk-76c0cx40.js} +2 -2
  65. package/dist/{chunk-adnpp676.js → chunk-76smt4zv.js} +3 -3
  66. package/dist/{chunk-96wvztgv.js → chunk-79ayc6qy.js} +2 -2
  67. package/dist/{chunk-xj2qfepx.js → chunk-79pvfyd0.js} +2 -2
  68. package/dist/{chunk-6hgcxkwd.js → chunk-7a70nd7e.js} +2 -2
  69. package/dist/chunk-7cab9zy0.js +2 -0
  70. package/dist/chunk-7s3f142h.js +2 -0
  71. package/dist/{chunk-xdmjwqgf.js → chunk-7v7wc7k5.js} +2 -2
  72. package/dist/{chunk-eraepgrh.js → chunk-7wd0kfqr.js} +2 -2
  73. package/dist/{chunk-3rew4bcf.js → chunk-7wpcdwan.js} +2 -2
  74. package/dist/chunk-7xvrsw7x.js +2 -0
  75. package/dist/{chunk-6cks2gn2.js → chunk-81hv0s07.js} +2 -2
  76. package/dist/{chunk-03mdvw7w.js → chunk-84eye2j0.js} +2 -2
  77. package/dist/{chunk-wjazfhrm.js → chunk-859359n0.js} +2 -2
  78. package/dist/{chunk-mptke00a.js → chunk-8ew2e3y7.js} +2 -2
  79. package/dist/{chunk-dgh0750h.js → chunk-8h4e3654.js} +2 -2
  80. package/dist/{chunk-mfs0b15q.js → chunk-8hygfx41.js} +2 -2
  81. package/dist/{chunk-2gp33sx4.js → chunk-8mzbkjhk.js} +2 -2
  82. package/dist/{chunk-vkfz61d6.js → chunk-8v53bkyr.js} +2 -2
  83. package/dist/{chunk-0k6zg9s1.js → chunk-9hjfc08t.js} +2 -2
  84. package/dist/{chunk-xvmmndhs.js → chunk-9ts08sma.js} +2 -2
  85. package/dist/chunk-a6ysp1fp.js +2 -0
  86. package/dist/chunk-a8r3mggj.js +2 -0
  87. package/dist/{chunk-tz1redf7.js → chunk-a9grdyep.js} +3 -3
  88. package/dist/chunk-ayt0bzr9.js +2 -0
  89. package/dist/{chunk-8jqaahna.js → chunk-az3g3a94.js} +2 -2
  90. package/dist/chunk-b42vv8f2.js +2 -0
  91. package/dist/chunk-b61qhh61.js +2 -0
  92. package/dist/{chunk-f7bn0nd2.js → chunk-bane0xc8.js} +2 -2
  93. package/dist/{chunk-pvdm1v6g.js → chunk-bcnh0z8e.js} +2 -2
  94. package/dist/{chunk-yk72yvcd.js → chunk-bdrcreqs.js} +2 -2
  95. package/dist/chunk-bfb8bpwc.js +2 -0
  96. package/dist/chunk-bgav9cq2.js +2 -0
  97. package/dist/chunk-bh0h7fz7.js +2 -0
  98. package/dist/chunk-bshgrwe9.js +2 -0
  99. package/dist/chunk-bsnmj69j.js +2 -0
  100. package/dist/chunk-capkej8s.js +2 -0
  101. package/dist/chunk-cer4dxas.js +2 -0
  102. package/dist/{chunk-pkkw0fxs.js → chunk-ck2ax5f6.js} +2 -2
  103. package/dist/chunk-cq7bbgcg.js +2 -0
  104. package/dist/{chunk-2wdvcx76.js → chunk-csbv8m51.js} +3 -3
  105. package/dist/chunk-d29xbf16.js +2 -0
  106. package/dist/chunk-d5gt1x0n.js +2 -0
  107. package/dist/{chunk-m0rznqwx.js → chunk-d6ke5e80.js} +2 -2
  108. package/dist/chunk-dp1nnwk2.js +2 -0
  109. package/dist/chunk-dpfjxym1.js +2 -0
  110. package/dist/{chunk-kawq8f1z.js → chunk-dxsjz3re.js} +2 -2
  111. package/dist/{chunk-z0z3xfn3.js → chunk-dypeezvv.js} +3 -3
  112. package/dist/{chunk-nase48et.js → chunk-e04g26qm.js} +2 -2
  113. package/dist/{chunk-322m8vk4.js → chunk-e5m9kg1w.js} +2 -2
  114. package/dist/{chunk-vvpagkya.js → chunk-e641842r.js} +2 -2
  115. package/dist/chunk-eqbp85f3.js +2 -0
  116. package/dist/{chunk-s5fk9ywy.js → chunk-et2pdaz7.js} +2 -2
  117. package/dist/chunk-f9z37ptq.js +2 -0
  118. package/dist/{chunk-nbch7nw2.js → chunk-fe83mqnb.js} +2 -2
  119. package/dist/{chunk-g98m1se7.js → chunk-ffs5nkt0.js} +2 -2
  120. package/dist/chunk-fn68kh69.js +2 -0
  121. package/dist/{chunk-bbwxqt7p.js → chunk-g751pxzk.js} +2 -2
  122. package/dist/{chunk-zr6xrady.js → chunk-gak8579e.js} +2 -2
  123. package/dist/{chunk-xmr3vcp8.js → chunk-gec6q1jb.js} +2 -2
  124. package/dist/{chunk-6cxa2jrx.js → chunk-geh3wyxw.js} +2 -2
  125. package/dist/chunk-gkyvgjyx.js +2 -0
  126. package/dist/chunk-gpcsb4tg.js +3 -0
  127. package/dist/{chunk-j8jn2p7q.js → chunk-h0k80cxs.js} +1 -1
  128. package/dist/{chunk-1dkd8jt0.js → chunk-h8r785ne.js} +2 -2
  129. package/dist/{chunk-m08yer2f.js → chunk-hcat58sr.js} +2 -2
  130. package/dist/{chunk-ws4qt1sc.js → chunk-heqa4swe.js} +2 -2
  131. package/dist/chunk-j2cdjycf.js +2 -0
  132. package/dist/{chunk-k025mmnv.js → chunk-j3g21ext.js} +2 -2
  133. package/dist/{chunk-z90zckkv.js → chunk-jcyv1q0x.js} +2 -2
  134. package/dist/chunk-jjgwfpmp.js +2 -0
  135. package/dist/{chunk-29jan02g.js → chunk-js3nhatr.js} +2 -2
  136. package/dist/{chunk-pphkxw72.js → chunk-jw1c8r97.js} +2 -2
  137. package/dist/{chunk-pae53dz2.js → chunk-jydhbkm8.js} +2 -2
  138. package/dist/{chunk-0y8pnj16.js → chunk-kbfe7gqw.js} +2 -2
  139. package/dist/{chunk-k86843av.js → chunk-kj3a1k2q.js} +2 -2
  140. package/dist/{chunk-nefts0rn.js → chunk-kk9dbwd1.js} +2 -2
  141. package/dist/{chunk-ywwfzgm6.js → chunk-m6080rsp.js} +2 -2
  142. package/dist/{chunk-vxkkzs4m.js → chunk-m8tt5bf9.js} +2 -2
  143. package/dist/{chunk-e8dzp9xe.js → chunk-m9ttf96p.js} +2 -2
  144. package/dist/{chunk-zsbsypka.js → chunk-mbsmb8jn.js} +2 -2
  145. package/dist/{chunk-76r5v06g.js → chunk-mc40zb3c.js} +2 -2
  146. package/dist/chunk-mcrd86tx.js +2 -0
  147. package/dist/{chunk-r9vjpafx.js → chunk-mdercwm8.js} +3 -3
  148. package/dist/{chunk-9q5a0kwf.js → chunk-mfn37eme.js} +2 -2
  149. package/dist/{chunk-hb22jn2e.js → chunk-mgmv8kap.js} +2 -2
  150. package/dist/{chunk-2q20937h.js → chunk-mtn6vdf8.js} +2 -2
  151. package/dist/{chunk-09w80wgb.js → chunk-n0q8e6sq.js} +2 -2
  152. package/dist/chunk-n9jaz2pd.js +2 -0
  153. package/dist/{chunk-pwsqw3mx.js → chunk-nbaxn7jx.js} +2 -2
  154. package/dist/{chunk-q6f0e289.js → chunk-nh56sb8e.js} +2 -2
  155. package/dist/{chunk-m9s9etss.js → chunk-nhstvqjy.js} +2 -2
  156. package/dist/chunk-nvgnan7w.js +2 -0
  157. package/dist/{chunk-6qh7fvgs.js → chunk-nypr6qtz.js} +3 -3
  158. package/dist/chunk-p1tcxky2.js +2 -0
  159. package/dist/chunk-p811gdar.js +2 -0
  160. package/dist/chunk-p8cm3xw1.js +2 -0
  161. package/dist/{chunk-hhnxwgz5.js → chunk-pnh5t6pc.js} +2 -2
  162. package/dist/{chunk-nm8245ze.js → chunk-pr36m3qx.js} +2 -2
  163. package/dist/chunk-pxv38ttf.js +2 -0
  164. package/dist/{chunk-7narmchf.js → chunk-q01vmp9m.js} +2 -2
  165. package/dist/{chunk-p521krn5.js → chunk-q4nx04sy.js} +2 -2
  166. package/dist/chunk-q73jne25.js +2 -0
  167. package/dist/{chunk-4cnm37fs.js → chunk-q7ka46hb.js} +3 -3
  168. package/dist/{chunk-jwsgt0d9.js → chunk-qdyyvd2w.js} +2 -2
  169. package/dist/{chunk-xtn9bw6a.js → chunk-qghq84r4.js} +2 -2
  170. package/dist/{chunk-d4edqxgc.js → chunk-qk1yqepm.js} +2 -2
  171. package/dist/chunk-qm2jq2bq.js +2 -0
  172. package/dist/{chunk-dps8nnde.js → chunk-qv23mh24.js} +2 -2
  173. package/dist/{chunk-kj3re492.js → chunk-qvw0kyse.js} +2 -2
  174. package/dist/chunk-qwet39v5.js +2 -0
  175. package/dist/{chunk-v77kjbkb.js → chunk-qxssxzws.js} +2 -2
  176. package/dist/chunk-r3hsjwjn.js +2 -0
  177. package/dist/{chunk-bm1x011j.js → chunk-r7paw6ba.js} +2 -2
  178. package/dist/{chunk-jzqvhnq5.js → chunk-rb4p3h5b.js} +2 -2
  179. package/dist/{chunk-w308wr7v.js → chunk-rff6c87z.js} +2 -2
  180. package/dist/chunk-rg8kj085.js +2 -0
  181. package/dist/{chunk-cxd1bwe7.js → chunk-rqa21qrv.js} +2 -2
  182. package/dist/{chunk-ckdkm4n7.js → chunk-rzxnxj25.js} +2 -2
  183. package/dist/chunk-s05ftq29.js +2 -0
  184. package/dist/chunk-s2k0g1hc.js +2 -0
  185. package/dist/chunk-s3j71dbh.js +2 -0
  186. package/dist/chunk-sdv06e2k.js +2 -0
  187. package/dist/{chunk-nxnzrbrc.js → chunk-sgbn37kz.js} +2 -2
  188. package/dist/{chunk-d7kcgxa2.js → chunk-sjqhtpzr.js} +2 -2
  189. package/dist/{chunk-zq7p8m7g.js → chunk-stc4ctrx.js} +2 -2
  190. package/dist/{chunk-nvv8aheh.js → chunk-t3m57q06.js} +2 -2
  191. package/dist/{chunk-b17rwepe.js → chunk-t686zwxk.js} +2 -2
  192. package/dist/{chunk-q16yvbsg.js → chunk-tctdn4kk.js} +2 -2
  193. package/dist/chunk-tfj6v7y4.js +2 -0
  194. package/dist/chunk-tknyjndw.js +7 -0
  195. package/dist/chunk-tsdb5jnj.js +2 -0
  196. package/dist/{chunk-69eysg08.js → chunk-tyka859b.js} +2 -2
  197. package/dist/chunk-v3dq3hx2.js +2 -0
  198. package/dist/{chunk-wsz4dh6m.js → chunk-v581r9vt.js} +3 -3
  199. package/dist/{chunk-ggad6492.js → chunk-vbbndjfd.js} +2 -2
  200. package/dist/chunk-vkj5fznh.js +4 -0
  201. package/dist/{chunk-mvebg1n7.js → chunk-vsh9vh4s.js} +2 -2
  202. package/dist/{chunk-acprqt2h.js → chunk-vx6shb4g.js} +2 -2
  203. package/dist/{chunk-8x33007g.js → chunk-w2xjhfm2.js} +3 -3
  204. package/dist/{chunk-ygjcmhng.js → chunk-w4bye56s.js} +2 -2
  205. package/dist/{chunk-10ar0368.js → chunk-wf7kfk3p.js} +2 -2
  206. package/dist/{chunk-2a6bv4xm.js → chunk-whb8ttdy.js} +2 -2
  207. package/dist/{chunk-37p8zdb1.js → chunk-whzs7yxf.js} +2 -2
  208. package/dist/{chunk-r67qt2tt.js → chunk-wsyfhh7y.js} +2 -2
  209. package/dist/chunk-ww3f6z4x.js +3 -0
  210. package/dist/{chunk-v3dp0ay9.js → chunk-wwj743gm.js} +2 -2
  211. package/dist/{chunk-mch9hd8q.js → chunk-wyxa2tfm.js} +5 -5
  212. package/dist/{chunk-9bk8tg2w.js → chunk-wz6765xb.js} +3 -3
  213. package/dist/{chunk-egw95b1p.js → chunk-x4enakra.js} +2 -2
  214. package/dist/{chunk-7e9s642q.js → chunk-x621s275.js} +2 -2
  215. package/dist/{chunk-484wg46e.js → chunk-xadfbbwt.js} +2 -2
  216. package/dist/{chunk-gjdeaqy2.js → chunk-xdcp8tj9.js} +2 -2
  217. package/dist/{chunk-atdygnc5.js → chunk-xk0dt0es.js} +2 -2
  218. package/dist/chunk-xk306vq1.js +2 -0
  219. package/dist/{chunk-dq7zxw47.js → chunk-ym6jphs4.js} +4 -4
  220. package/dist/{chunk-x785yg93.js → chunk-ymgc4317.js} +2 -2
  221. package/dist/{chunk-csw1rzrc.js → chunk-ymk7ampx.js} +2 -2
  222. package/dist/{chunk-nvh0e8y1.js → chunk-z8sheg2r.js} +2 -2
  223. package/dist/{chunk-8ysh4mx1.js → chunk-zm6b6zyr.js} +2 -2
  224. package/dist/chunk-znagg8v9.js +2 -0
  225. package/dist/chunk-zpqj0ka8.js +2 -0
  226. package/dist/{chunk-2y13vckf.js → chunk-zsrjzx7g.js} +2 -2
  227. package/dist/{chunk-ky2p8zyg.js → chunk-zwyd2bhy.js} +2 -2
  228. package/dist/{chunk-rr2cjfcz.js → chunk-zz582m73.js} +2 -2
  229. package/dist/{chunk-x6cfmt4y.js → chunk-zzqbe5r0.js} +2 -2
  230. package/dist/client.js +1 -1
  231. package/dist/codex/activity-group.js +1 -1
  232. package/dist/codex/artifact-links.js +1 -1
  233. package/dist/codex/assistant-message.js +1 -1
  234. package/dist/codex/async-question-card.js +1 -1
  235. package/dist/codex/disclosure-state.js +1 -1
  236. package/dist/codex/edited-files-card.js +1 -1
  237. package/dist/codex/image-view-activity.js +1 -1
  238. package/dist/codex/markdown-renderer.js +1 -1
  239. package/dist/codex/navigation-audio.js +1 -1
  240. package/dist/codex/navigation-preview.js +1 -1
  241. package/dist/codex/navigation-rail.js +1 -1
  242. package/dist/codex/patch-view.js +1 -1
  243. package/dist/codex/plan.js +1 -1
  244. package/dist/codex/timeline-virtualizer.js +1 -1
  245. package/dist/codex/turn-activity.js +1 -1
  246. package/dist/codex/user-message.js +1 -1
  247. package/dist/codex/virtualized-turn-list.js +1 -1
  248. package/dist/collections/collection-emoji.js +1 -1
  249. package/dist/collections/collection-menu.js +1 -1
  250. package/dist/collections/collection-panel.js +1 -1
  251. package/dist/collections/collections.js +1 -1
  252. package/dist/collections/host.js +1 -1
  253. package/dist/collections/locales.js +1 -1
  254. package/dist/collections/model.js +1 -1
  255. package/dist/collections/store.js +1 -1
  256. package/dist/composer/completion-filter.js +1 -1
  257. package/dist/composer/completion-menu.js +1 -1
  258. package/dist/composer/completion-trigger.js +1 -1
  259. package/dist/composer/effort-slider.js +1 -1
  260. package/dist/composer/inline-document.js +1 -1
  261. package/dist/composer/inline-dom.js +1 -1
  262. package/dist/composer/model-select.js +1 -1
  263. package/dist/composer/permission-mode-select.js +1 -1
  264. package/dist/composer/prompt-input-attachments.js +1 -1
  265. package/dist/composer/prompt-input-clipboard.js +1 -1
  266. package/dist/composer/prompt-input-context.js +1 -1
  267. package/dist/composer/prompt-input-inline.js +1 -1
  268. package/dist/composer/prompt-input-textarea.js +1 -1
  269. package/dist/composer/prompt-input.js +1 -1
  270. package/dist/conversation/action-card.js +1 -1
  271. package/dist/conversation/composer/app-mentions.js +1 -1
  272. package/dist/conversation/composer/apps-menu.js +1 -1
  273. package/dist/conversation/composer/composer-menu.js +1 -1
  274. package/dist/conversation/composer/composer.js +1 -1
  275. package/dist/conversation/composer/config-options.js +1 -1
  276. package/dist/conversation/composer/context.js +1 -1
  277. package/dist/conversation/composer/drafts.js +1 -1
  278. package/dist/conversation/composer/file-items.js +1 -1
  279. package/dist/conversation/composer/long-text.js +1 -1
  280. package/dist/conversation/composer/mention-chips.js +1 -1
  281. package/dist/conversation/composer/mention-uri.js +1 -1
  282. package/dist/conversation/composer/model-menu.js +1 -1
  283. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  284. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  285. package/dist/conversation/composer/prediction.js +1 -1
  286. package/dist/conversation/composer/prompt-history.js +1 -1
  287. package/dist/conversation/composer/slash-command-button.js +1 -1
  288. package/dist/conversation/composer/submit-button.js +1 -1
  289. package/dist/conversation/composer/usage-meter.js +1 -1
  290. package/dist/conversation/connection-notice.js +1 -1
  291. package/dist/conversation/context.js +1 -1
  292. package/dist/conversation/conversation-body.js +1 -1
  293. package/dist/conversation/conversation-search.js +1 -1
  294. package/dist/conversation/conversation-view.js +1 -1
  295. package/dist/conversation/conversation.js +1 -1
  296. package/dist/conversation/diff-modal.js +1 -1
  297. package/dist/conversation/draft-project-picker.js +1 -1
  298. package/dist/conversation/session-actions.js +1 -1
  299. package/dist/conversation/subagent-sessions.js +1 -1
  300. package/dist/conversation/subagent-tasks.js +1 -1
  301. package/dist/desktop/desktop-composer.js +1 -1
  302. package/dist/desktop/desktop.js +1 -1
  303. package/dist/desktop/draft-model-select.js +1 -1
  304. package/dist/desktop/load-image.js +1 -1
  305. package/dist/desktop/model-catalog.js +1 -1
  306. package/dist/desktop/model-recovery.js +1 -1
  307. package/dist/desktop/model-settings-action.js +1 -1
  308. package/dist/desktop/native-file-drop.js +1 -1
  309. package/dist/generated/commands.js +1 -1
  310. package/dist/image-lightbox.js +1 -1
  311. package/dist/image-preview-dialog.js +1 -1
  312. package/dist/image.js +1 -1
  313. package/dist/lib/app-reference.js +1 -1
  314. package/dist/lib/application-metadata.js +1 -1
  315. package/dist/lib/chat-path.js +1 -1
  316. package/dist/lib/code-highlighter.js +1 -1
  317. package/dist/lib/file-url.js +1 -1
  318. package/dist/lib/fuzzy.js +1 -1
  319. package/dist/lib/group-blocks.js +1 -1
  320. package/dist/lib/image-encode.js +1 -1
  321. package/dist/lib/limits.js +1 -1
  322. package/dist/lib/markdown-parser.js +1 -1
  323. package/dist/lib/markdown-rules.js +1 -1
  324. package/dist/lib/model-name.js +1 -1
  325. package/dist/lib/pointer-centered-zoom.js +1 -1
  326. package/dist/lib/prepare-prompt-files.js +1 -1
  327. package/dist/lib/reference-presentation.js +1 -1
  328. package/dist/lib/stream-style.js +1 -1
  329. package/dist/lib/streaming-markdown.js +1 -1
  330. package/dist/lib/tool-artifacts.js +1 -1
  331. package/dist/locales.js +1 -1
  332. package/dist/mermaid/diagram.js +1 -1
  333. package/dist/mermaid/export.js +1 -1
  334. package/dist/mermaid/index.js +1 -1
  335. package/dist/mermaid/preview.js +1 -1
  336. package/dist/oauth/claude-login.js +1 -1
  337. package/dist/oauth.js +1 -1
  338. package/dist/plugins/catalog-header.js +1 -1
  339. package/dist/plugins/catalog-skeleton.js +1 -1
  340. package/dist/plugins/host.d.ts +1 -1
  341. package/dist/plugins/host.js +1 -1
  342. package/dist/plugins/new-chat-directory.js +1 -1
  343. package/dist/plugins/pane.js +1 -1
  344. package/dist/plugins/panel-item.js +1 -1
  345. package/dist/plugins/plugin-detail-page.js +1 -1
  346. package/dist/plugins/plugin-icon.js +1 -1
  347. package/dist/plugins/plugin-icons.js +1 -1
  348. package/dist/plugins/plugins-page.js +1 -1
  349. package/dist/plugins/plugins.js +1 -1
  350. package/dist/plugins/read-skill-document.js +1 -1
  351. package/dist/plugins/skill-document.js +1 -1
  352. package/dist/plugins/skills-tab.js +1 -1
  353. package/dist/plugins/store.d.ts +1 -1
  354. package/dist/plugins/store.js +1 -1
  355. package/dist/plugins/toolbox-layout.js +1 -1
  356. package/dist/reference-projection.js +1 -1
  357. package/dist/search/chat-search.js +1 -1
  358. package/dist/search/codex-source-matches.js +1 -1
  359. package/dist/search/dom-matches.js +1 -1
  360. package/dist/search/find-bar.js +1 -1
  361. package/dist/search/literal-matches.js +1 -1
  362. package/dist/session-list/account-menu.js +1 -1
  363. package/dist/session-list/activity-list.js +1 -1
  364. package/dist/session-list/archived-sessions.js +1 -1
  365. package/dist/session-list/help-menu.js +1 -1
  366. package/dist/session-list/highlight.js +1 -1
  367. package/dist/session-list/host.js +1 -1
  368. package/dist/session-list/hover-info-card.js +1 -1
  369. package/dist/session-list/locales.js +1 -1
  370. package/dist/session-list/navigation-controls.js +1 -1
  371. package/dist/session-list/navigation-header.js +1 -1
  372. package/dist/session-list/navigation-store.js +1 -1
  373. package/dist/session-list/navigation-tabs.js +1 -1
  374. package/dist/session-list/navigation.js +1 -1
  375. package/dist/session-list/overflow-marquee.js +1 -1
  376. package/dist/session-list/platform.js +1 -1
  377. package/dist/session-list/row-stop-button.js +1 -1
  378. package/dist/session-list/session-groups.js +1 -1
  379. package/dist/session-list/session-info-card.js +1 -1
  380. package/dist/session-list/session-list.js +1 -1
  381. package/dist/session-list/session-row.js +1 -1
  382. package/dist/session-list/session-state-dot.js +1 -1
  383. package/dist/session-list/session-state-menu.js +1 -1
  384. package/dist/session-list/shortcut-hint.js +1 -1
  385. package/dist/session-list/shortcut.js +1 -1
  386. package/dist/session-list/sidebar-overlay.js +1 -1
  387. package/dist/session-list/trailing-swap.js +1 -1
  388. package/dist/session-list/use-activity-notification.js +1 -1
  389. package/dist/session-list/use-activity-preview.js +1 -1
  390. package/dist/session-list/use-cmd-held.js +1 -1
  391. package/dist/session-list/use-project-sessions.js +1 -1
  392. package/dist/session-list/virtual-session-rows.js +1 -1
  393. package/dist/session-timeline/activity-group.js +1 -1
  394. package/dist/session-timeline/activity-projection.js +1 -1
  395. package/dist/session-timeline/assistant-content.js +1 -1
  396. package/dist/session-timeline/assistant-image-references.js +1 -1
  397. package/dist/session-timeline/assistant-turn.js +1 -1
  398. package/dist/session-timeline/async-questions.js +1 -1
  399. package/dist/session-timeline/edited-files-card.js +1 -1
  400. package/dist/session-timeline/history-timeline.js +1 -1
  401. package/dist/session-timeline/host.js +1 -1
  402. package/dist/session-timeline/image-generation-progress.js +1 -1
  403. package/dist/session-timeline/navigation-rail.js +1 -1
  404. package/dist/session-timeline/plan.js +1 -1
  405. package/dist/session-timeline/question-reply.js +1 -1
  406. package/dist/session-timeline/resource-content.js +1 -1
  407. package/dist/session-timeline/session-timeline.js +1 -1
  408. package/dist/session-timeline/timeline-registry.js +1 -1
  409. package/dist/session-timeline/turn-activity.js +1 -1
  410. package/dist/session-timeline/turn-error.js +1 -1
  411. package/dist/session-timeline/turn-retry.js +1 -1
  412. package/dist/session-timeline/turn-time.js +1 -1
  413. package/dist/session-timeline/turns.js +1 -1
  414. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  415. package/dist/session-timeline/user-message.js +1 -1
  416. package/dist/settings/codex-account-card.js +1 -1
  417. package/dist/settings/login-card.js +1 -1
  418. package/dist/settings/model-alias-settings.js +1 -1
  419. package/dist/settings/model-aliases.js +1 -1
  420. package/dist/settings/provider-logos.js +1 -1
  421. package/dist/settings/provider-section.js +1 -1
  422. package/dist/settings/providers-port.js +1 -1
  423. package/dist/settings/providers.js +1 -1
  424. package/dist/settings/settings-bridge.js +1 -1
  425. package/dist/settings/settings.js +1 -1
  426. package/native/darwin-arm64/artifact.json +1 -1
  427. package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
  428. package/native/win32-x64/alwith_native_chat.dll +0 -0
  429. package/native/win32-x64/artifact.json +1 -1
  430. package/package.json +2 -7
  431. package/dist/chunk-04778wzq.js +0 -2
  432. package/dist/chunk-0ppwk6y9.js +0 -2
  433. package/dist/chunk-0yngh0w6.js +0 -2
  434. package/dist/chunk-1fnfd1yv.js +0 -2
  435. package/dist/chunk-1jd0p7b8.js +0 -2
  436. package/dist/chunk-2jkv90n6.js +0 -2
  437. package/dist/chunk-3c9se1ha.js +0 -2
  438. package/dist/chunk-3zr6f9nd.js +0 -4
  439. package/dist/chunk-43s8pmw9.js +0 -2
  440. package/dist/chunk-4r8pqg1h.js +0 -2
  441. package/dist/chunk-52y91amb.js +0 -2
  442. package/dist/chunk-5s0k93vr.js +0 -3
  443. package/dist/chunk-6aj4cgfs.js +0 -2
  444. package/dist/chunk-723kazw5.js +0 -2
  445. package/dist/chunk-79qh74jn.js +0 -2
  446. package/dist/chunk-7kxa1krk.js +0 -2
  447. package/dist/chunk-7xszqjre.js +0 -2
  448. package/dist/chunk-8at6403h.js +0 -2
  449. package/dist/chunk-8zrmp6dw.js +0 -3
  450. package/dist/chunk-90mq5g5a.js +0 -1
  451. package/dist/chunk-aazp5pw2.js +0 -2
  452. package/dist/chunk-b5afm26d.js +0 -2
  453. package/dist/chunk-bbpjhe4e.js +0 -2
  454. package/dist/chunk-br1vyrce.js +0 -2
  455. package/dist/chunk-fdqfbhwd.js +0 -2
  456. package/dist/chunk-fjr7n326.js +0 -2
  457. package/dist/chunk-fwk2ayca.js +0 -2
  458. package/dist/chunk-g9vjpmrq.js +0 -2
  459. package/dist/chunk-gh1jdr70.js +0 -2
  460. package/dist/chunk-j420zak2.js +0 -2
  461. package/dist/chunk-mz8tjgre.js +0 -2
  462. package/dist/chunk-n2gm013f.js +0 -2
  463. package/dist/chunk-na5pcj57.js +0 -2
  464. package/dist/chunk-q2v4hre7.js +0 -2
  465. package/dist/chunk-qhes5k0g.js +0 -2
  466. package/dist/chunk-qhj8374f.js +0 -2
  467. package/dist/chunk-rnxbtzg9.js +0 -2
  468. package/dist/chunk-rpzv6g89.js +0 -2
  469. package/dist/chunk-rqck9w0f.js +0 -2
  470. package/dist/chunk-rv3gpjgk.js +0 -2
  471. package/dist/chunk-sm16wn9x.js +0 -2
  472. package/dist/chunk-swq34ay7.js +0 -2
  473. package/dist/chunk-t12xpbtp.js +0 -3
  474. package/dist/chunk-t4vfpx6a.js +0 -2
  475. package/dist/chunk-t6z3khr5.js +0 -2
  476. package/dist/chunk-tac30kkh.js +0 -2
  477. package/dist/chunk-tdw5wrey.js +0 -2
  478. package/dist/chunk-thxz5zm6.js +0 -2
  479. package/dist/chunk-tvfmbabv.js +0 -2
  480. package/dist/chunk-twrdy8cb.js +0 -2
  481. package/dist/chunk-tzr6phth.js +0 -2
  482. package/dist/chunk-v066qn38.js +0 -2
  483. package/dist/chunk-v2m44e5f.js +0 -2
  484. package/dist/chunk-x5cv0bfc.js +0 -4
  485. package/dist/chunk-xdrwsxqy.js +0 -2
  486. package/dist/chunk-xx0hs7b3.js +0 -2
  487. package/dist/chunk-yaxe4yd4.js +0 -2
  488. package/dist/chunk-yey8qz6h.js +0 -2
  489. package/dist/chunk-yfnnrm9g.js +0 -7
  490. package/dist/chunk-yqjmqa0t.js +0 -2
  491. package/dist/chunk-zfsbhwe1.js +0 -2
  492. package/dist/import.d.ts +0 -1
  493. package/dist/import.js +0 -1
package/README.md CHANGED
@@ -399,7 +399,7 @@ Use the matching request's error chain and proxy steps to identify the failing c
399
399
  `stageEmojiData(directory)` from `@alwith/module-chat/stage` copies the bundled Emojibase data (`en`, `zh`) the collection emoji picker loads; serve it at the host's `emojibaseUrl` (U: `public/emojibase`).
400
400
 
401
401
 
402
- Applications import protocol clients and session projections from `@alwith/module-chat/client`, conversation import utilities from `@alwith/module-chat/import`, and build-time `stageChatAdapter(directory, licenses)` from `@alwith/module-chat/stage`. The chat package owns the adapter dependency and resolves it relative to its own installation; applications must not declare it separately or reach into a hoisted `node_modules` path. Staging preserves the published adapter bytes and includes both license notices. Runtime remains responsible for process ownership.
402
+ Applications import protocol clients and session projections from `@alwith/module-chat/client` and build-time `stageChatAdapter(directory, licenses)` from `@alwith/module-chat/stage`. The chat package owns the adapter dependency and resolves it relative to its own installation; applications must not declare it separately or reach into a hoisted `node_modules` path. Staging preserves the published adapter bytes and includes both license notices. Runtime remains responsible for process ownership.
403
403
 
404
404
  ### Application tools
405
405
 
@@ -1 +1 @@
1
- import{ss,c,L}from"./chunk-10ar0368.js";export{ss as ActivityHostProvider,L as ActivityMarkdown,c as useActivityHost};
1
+ import{ys,c,O}from"./chunk-wf7kfk3p.js";export{ys as ActivityHostProvider,O as ActivityMarkdown,c as useActivityHost};
@@ -1 +1 @@
1
- import{ho}from"../chunk-pwsqw3mx.js";import"../chunk-dps8nnde.js";import"../chunk-nm8245ze.js";export{ho as ApplicationClient};
1
+ import{wo}from"../chunk-nbaxn7jx.js";import"../chunk-qv23mh24.js";import"../chunk-pr36m3qx.js";export{wo as ApplicationClient};
@@ -1 +1 @@
1
- import{x,$i}from"../chunk-3c9se1ha.js";import"../chunk-fdmtynmq.js";import"../chunk-n2gm013f.js";import"../chunk-bm1x011j.js";import"../chunk-pphkxw72.js";import"../chunk-zsbsypka.js";import"../chunk-d7kcgxa2.js";import"../chunk-bbpjhe4e.js";import"../chunk-1jd0p7b8.js";import"../chunk-b5afm26d.js";import"../chunk-q6f0e289.js";import"../chunk-wsz4dh6m.js";import"../chunk-pwsqw3mx.js";import"../chunk-dps8nnde.js";import"../chunk-nm8245ze.js";import"../chunk-0k6zg9s1.js";import"../chunk-tvfmbabv.js";export{$i as CodexClient,x as NATIVE_MODEL_GROUP};
1
+ import{C,ur}from"../chunk-zpqj0ka8.js";import"../chunk-r7paw6ba.js";import"../chunk-nbaxn7jx.js";import"../chunk-sjqhtpzr.js";import"../chunk-jw1c8r97.js";import"../chunk-tsdb5jnj.js";import"../chunk-v581r9vt.js";import"../chunk-tfj6v7y4.js";import"../chunk-qwet39v5.js";import"../chunk-xk306vq1.js";import"../chunk-nh56sb8e.js";import"../chunk-3a5sn0v8.js";import"../chunk-mbsmb8jn.js";import"../chunk-qv23mh24.js";import"../chunk-pr36m3qx.js";import"../chunk-9hjfc08t.js";import"../chunk-b42vv8f2.js";export{ur as CodexClient,C as NATIVE_MODEL_GROUP};
@@ -1 +1 @@
1
- import{go}from"../chunk-zsbsypka.js";export{go as customModelEffort};
1
+ import{_o}from"../chunk-mbsmb8jn.js";export{_o as customModelEffort};
@@ -1 +1 @@
1
- import{un}from"../chunk-d7kcgxa2.js";export{un as forkTitle};
1
+ import{On}from"../chunk-sjqhtpzr.js";export{On as forkTitle};
@@ -1 +1 @@
1
- import{Zi,fo,Qi}from"../chunk-wsz4dh6m.js";export{Zi as IMAGE_WORKFLOW_INSTRUCTIONS,Qi as imageGenerationPrompt,fo as imageRequestAspect};
1
+ import{gr,ko,fr}from"../chunk-v581r9vt.js";export{gr as IMAGE_WORKFLOW_INSTRUCTIONS,fr as imageGenerationPrompt,ko as imageRequestAspect};
@@ -1 +1 @@
1
- import{Ki}from"../chunk-bbpjhe4e.js";import"../chunk-wsz4dh6m.js";import"../chunk-nm8245ze.js";import"../chunk-0k6zg9s1.js";import"../chunk-tvfmbabv.js";export{Ki as createImageTool};
1
+ import{mr}from"../chunk-tsdb5jnj.js";import"../chunk-v581r9vt.js";import"../chunk-pr36m3qx.js";import"../chunk-9hjfc08t.js";import"../chunk-b42vv8f2.js";export{mr as createImageTool};
@@ -1 +1 @@
1
- import{qi,dn}from"../chunk-pphkxw72.js";export{qi as parseInputConfig,dn as parseInputSnapshot};
1
+ import{pr,Hn}from"../chunk-jw1c8r97.js";export{pr as parseInputConfig,Hn as parseInputSnapshot};
@@ -1 +1 @@
1
- import{Wi}from"../../chunk-b5afm26d.js";import"../../chunk-q6f0e289.js";export{Wi as chatInputMode};
1
+ import{hr}from"../../chunk-qwet39v5.js";import"../../chunk-nh56sb8e.js";export{hr as chatInputMode};
@@ -1 +1 @@
1
- import{mo}from"../../chunk-fdmtynmq.js";export{mo as executionMeta};
1
+ import{So}from"../../chunk-3a5sn0v8.js";export{So as executionMeta};
@@ -1 +1 @@
1
- import{gt}from"../../chunk-q6f0e289.js";export{gt as imageApplicationContext};
1
+ import{_t}from"../../chunk-nh56sb8e.js";export{_t as imageApplicationContext};
@@ -1 +1 @@
1
- import{me}from"../../chunk-1jd0p7b8.js";import"../../chunk-q6f0e289.js";import"../../chunk-0k6zg9s1.js";import"../../chunk-tvfmbabv.js";export{me as imageInputMode};
1
+ import{fe}from"../../chunk-xk306vq1.js";import"../../chunk-nh56sb8e.js";import"../../chunk-9hjfc08t.js";import"../../chunk-b42vv8f2.js";export{fe as imageInputMode};
@@ -1 +1 @@
1
- import{Je,Ie,Vs}from"../../chunk-n2gm013f.js";import"../../chunk-1jd0p7b8.js";import"../../chunk-b5afm26d.js";import"../../chunk-q6f0e289.js";import"../../chunk-0k6zg9s1.js";import"../../chunk-tvfmbabv.js";export{Ie as inputModeDefinition,Je as isInputMode,Vs as resolveInputMode};
1
+ import{nt,De,ia}from"../../chunk-tfj6v7y4.js";import"../../chunk-qwet39v5.js";import"../../chunk-xk306vq1.js";import"../../chunk-nh56sb8e.js";import"../../chunk-9hjfc08t.js";import"../../chunk-b42vv8f2.js";export{De as inputModeDefinition,nt as isInputMode,ia as resolveInputMode};
@@ -1 +1 @@
1
- import{Fs}from"../chunk-ggad6492.js";export{Fs as macProjectPaths};
1
+ import{ta}from"../chunk-vbbndjfd.js";export{ta as macProjectPaths};
@@ -1 +1 @@
1
- import{pe,cn,js}from"../chunk-bm1x011j.js";export{js as explainRequestError,pe as isAuthenticationRequired,cn as isModelSelectionRequired};
1
+ import{ge,Fn,oa}from"../chunk-r7paw6ba.js";export{oa as explainRequestError,ge as isAuthenticationRequired,Fn as isModelSelectionRequired};
@@ -1 +1 @@
1
- import{Ds}from"../chunk-x785yg93.js";export{Ds as watchSessionList};
1
+ import{na}from"../chunk-ymgc4317.js";export{na as watchSessionList};
@@ -1 +1 @@
1
- import{he}from"./chunk-egw95b1p.js";import"./chunk-mvebg1n7.js";import"./chunk-05eftctr.js";export{he as AppReferenceBadge};
1
+ import{be}from"./chunk-x4enakra.js";import"./chunk-vsh9vh4s.js";import"./chunk-542c9tpr.js";export{be as AppReferenceBadge};
@@ -1 +1 @@
1
- import{gn,fn,vo}from"./chunk-nm8245ze.js";export{vo as ApplicationToolRegistry,fn as applicationToolSet,gn as defineApplicationTool};
1
+ import{Bn,Gn,Po}from"./chunk-pr36m3qx.js";export{Po as ApplicationToolRegistry,Gn as applicationToolSet,Bn as defineApplicationTool};
@@ -1 +1 @@
1
- import{Yo,Qn,Ke,qt}from"../chunk-yaxe4yd4.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?Yo(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Ke(i)){let c=qt(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Ke(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Ke(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=qt(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=qt(r),m=Ke(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:Qn(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:Qn(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
1
+ import{lr,fo,tt,En}from"../chunk-nvgnan7w.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?lr(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!tt(i)){let c=En(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(tt(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(tt(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=En(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=En(r),m=tt(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:fo(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:fo(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
@@ -1 +1 @@
1
- import{Yo,Qn,Ke,qt}from"../chunk-yaxe4yd4.js";export{Yo as elicitationFields,Qn as elicitationLabels,qt as elicitationOptions,Ke as isMultiSelect};
1
+ import{lr,fo,tt,En}from"../chunk-nvgnan7w.js";export{lr as elicitationFields,fo as elicitationLabels,En as elicitationOptions,tt as isMultiSelect};
@@ -1 +1 @@
1
- import{ta,os,dl,ul}from"../chunk-swq34ay7.js";export{ta as PERMISSION_KIND_GROUP_ORDER,dl as isAllowKind,ul as isAlwaysKind,os as sortPermissionOptions};
1
+ import{Zs,Xi,qa,Ka}from"../chunk-4gxpna3p.js";export{Zs as PERMISSION_KIND_GROUP_ORDER,qa as isAllowKind,Ka as isAlwaysKind,Xi as sortPermissionOptions};
@@ -1 +1 @@
1
- import{ts}from"../chunk-xvmmndhs.js";import"../chunk-swq34ay7.js";export{ts as PermissionView};
1
+ import{Ji}from"../chunk-9ts08sma.js";import"../chunk-4gxpna3p.js";export{Ji as PermissionView};
@@ -1 +1 @@
1
- import{za,ea,Va,ns}from"../chunk-qbt8ahwr.js";export{ns as SchemaElicitationForm,za as elicitationFields,ea as initialValues,Va as isAnswered};
1
+ import{Ra,Ws,La,Qi}from"../chunk-2fx3qhyb.js";export{Qi as SchemaElicitationForm,Ra as elicitationFields,Ws as initialValues,La as isAnswered};
@@ -1 +1 @@
1
- import{is}from"../chunk-8jqaahna.js";export{is as UrlElicitationCard};
1
+ import{Zi}from"../chunk-az3g3a94.js";export{Zi as UrlElicitationCard};
@@ -0,0 +1,2 @@
1
+ import{xe}from"./chunk-g751pxzk.js";function w(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ot(e){if(!e.includes("app://"))return[];let n=xe(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=w(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function os(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function is(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
2
+ export{w,Ot,Pa,os,is};
@@ -1,3 +1,3 @@
1
- import{c}from"./chunk-10ar0368.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
2
- `).length}function Oa(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function ur({blocks:e}){return s(_o,{files:Oa(e)})}function _o({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
3
- export{Oa,ur,_o};
1
+ import{c}from"./chunk-wf7kfk3p.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
2
+ `).length}function Va(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function ds({blocks:e}){return s($o,{files:Va(e)})}function $o({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
3
+ export{Va,ds,$o};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";function bn({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
2
- export{bn};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";function Xt({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
2
+ export{Xt};
@@ -1,2 +1,2 @@
1
- import{b}from"./chunk-52y91amb.js";var Ao="application/x-alwith-app-references+json";function u(n){let r=[],t=n.apps.map((e,o)=>({app:e,order:o,offset:Math.max(0,Math.min(n.text.length,e.offset??0))})).sort((e,o)=>e.offset-o.offset||e.order-o.order),i=0;for(let{app:e,offset:o}of t)r.push(...n.text.slice(i,o).split(""),e),i=o;return r.push(...n.text.slice(i).split("")),r}function _(n){let r="",t=[],i=new Set;for(let e of n)if(typeof e==="string")r+=e;else if(!i.has(e.id))i.add(e.id),t.push({...e,offset:r.length});return{text:r,apps:t}}function vn(n,r){return n.slice(0,r).filter((t)=>typeof t==="string").length}function Eo(n,r){let t=0;for(let i=0;i<n.length;i++){if(typeof n[i]!=="string")continue;if(t===r)return i;t++}return n.length}function yt(n){let r=n.getData(Ao);if(!r)return null;let t;try{t=JSON.parse(r)}catch{return null}if(typeof t!=="object"||t===null||!("version"in t)||t.version!==1||!("text"in t)||typeof t.text!=="string"||!("apps"in t)||!Array.isArray(t.apps))return null;let i=[];for(let e of t.apps){if(typeof e!=="object"||e===null||typeof e.id!=="string"||b(`app://${e.id}`)!==e.id||typeof e.name!=="string"||!e.name.trim()||!Number.isInteger(e.offset)||e.offset<0||e.offset>t.text.length)return null;if(e.iconUrl!=null&&typeof e.iconUrl!=="string"||e.iconUrlDark!=null&&typeof e.iconUrlDark!=="string")return null;i.push({id:e.id,name:e.name,offset:e.offset,...e.iconUrl?{iconUrl:e.iconUrl}:{},...e.iconUrlDark?{iconUrlDark:e.iconUrlDark}:{}})}return _(u({text:t.text,apps:i}))}
2
- export{Ao,u,_,vn,Eo,yt};
1
+ import{w}from"./chunk-0myf2ak0.js";var xo="application/x-alwith-app-references+json";function p(n){let r=[],t=n.apps.map((e,o)=>({app:e,order:o,offset:Math.max(0,Math.min(n.text.length,e.offset??0))})).sort((e,o)=>e.offset-o.offset||e.order-o.order),i=0;for(let{app:e,offset:o}of t)r.push(...n.text.slice(i,o).split(""),e),i=o;return r.push(...n.text.slice(i).split("")),r}function _(n){let r="",t=[],i=new Set;for(let e of n)if(typeof e==="string")r+=e;else if(!i.has(e.id))i.add(e.id),t.push({...e,offset:r.length});return{text:r,apps:t}}function Rn(n,r){return n.slice(0,r).filter((t)=>typeof t==="string").length}function bo(n,r){let t=0;for(let i=0;i<n.length;i++){if(typeof n[i]!=="string")continue;if(t===r)return i;t++}return n.length}function Ct(n){let r=n.getData(xo);if(!r)return null;let t;try{t=JSON.parse(r)}catch{return null}if(typeof t!=="object"||t===null||!("version"in t)||t.version!==1||!("text"in t)||typeof t.text!=="string"||!("apps"in t)||!Array.isArray(t.apps))return null;let i=[];for(let e of t.apps){if(typeof e!=="object"||e===null||typeof e.id!=="string"||w(`app://${e.id}`)!==e.id||typeof e.name!=="string"||!e.name.trim()||!Number.isInteger(e.offset)||e.offset<0||e.offset>t.text.length)return null;if(e.iconUrl!=null&&typeof e.iconUrl!=="string"||e.iconUrlDark!=null&&typeof e.iconUrlDark!=="string")return null;i.push({id:e.id,name:e.name,offset:e.offset,...e.iconUrl?{iconUrl:e.iconUrl}:{},...e.iconUrlDark?{iconUrlDark:e.iconUrlDark}:{}})}return _(p({text:t.text,apps:i}))}
2
+ export{xo,p,_,Rn,bo,Ct};
@@ -1,2 +1,2 @@
1
- function Uo(o){let t=new DOMParser().parseFromString(o,"image/svg+xml").documentElement,e=t.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);if(t.localName!=="svg"||e?.length!==4||!e.every(Number.isFinite)||e[2]<=0||e[3]<=0)throw Error("Mermaid SVG has no valid viewBox");let[,,a,i]=e;return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",String(a)),t.setAttribute("height",String(i)),t.style.removeProperty("max-width"),{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(t))}`,width:a,height:i}}async function Lr(o,s){await document.fonts.ready;let{src:t,width:e,height:a}=Uo(o),i=new Image;await new Promise((h,c)=>{i.onload=()=>h(),i.onerror=()=>c(Error("Could not load the Mermaid diagram")),i.src=t});let g=Math.min(2,8192/e,8192/a,Math.sqrt(16777216/(e*a))),r=document.createElement("canvas");r.width=Math.max(1,Math.ceil(e*g)),r.height=Math.max(1,Math.ceil(a*g));let n=r.getContext("2d");if(!n)throw Error("Could not create the PNG canvas");n.fillStyle=s,n.fillRect(0,0,r.width,r.height),n.drawImage(i,0,0,r.width,r.height);let m=r.toDataURL("image/png");if(!m.startsWith("data:image/png;base64,"))throw Error("PNG export failed");return m.slice(22)}
2
- export{Uo,Lr};
1
+ function Uo(o){let t=new DOMParser().parseFromString(o,"image/svg+xml").documentElement,e=t.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);if(t.localName!=="svg"||e?.length!==4||!e.every(Number.isFinite)||e[2]<=0||e[3]<=0)throw Error("Mermaid SVG has no valid viewBox");let[,,a,i]=e;return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("width",String(a)),t.setAttribute("height",String(i)),t.style.removeProperty("max-width"),{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(t))}`,width:a,height:i}}async function Yr(o,s){await document.fonts.ready;let{src:t,width:e,height:a}=Uo(o),i=new Image;await new Promise((h,c)=>{i.onload=()=>h(),i.onerror=()=>c(Error("Could not load the Mermaid diagram")),i.src=t});let g=Math.min(2,8192/e,8192/a,Math.sqrt(16777216/(e*a))),r=document.createElement("canvas");r.width=Math.max(1,Math.ceil(e*g)),r.height=Math.max(1,Math.ceil(a*g));let n=r.getContext("2d");if(!n)throw Error("Could not create the PNG canvas");n.fillStyle=s,n.fillRect(0,0,r.width,r.height),n.drawImage(i,0,0,r.width,r.height);let m=r.toDataURL("image/png");if(!m.startsWith("data:image/png;base64,"))throw Error("PNG export failed");return m.slice(22)}
2
+ export{Uo,Yr};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-tac30kkh.js";import{De}from"./chunk-5s0k93vr.js";import{rt}from"./chunk-yqjmqa0t.js";import{Rn}from"./chunk-q16yvbsg.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Nn({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function es({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Nn,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Nn,{label:rt(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Nn,{label:rt(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function An({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(es,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Rn,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(De,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
2
- export{Nn,es,An};
1
+ import{e}from"./chunk-bshgrwe9.js";import{we}from"./chunk-3qwtda21.js";import{et}from"./chunk-rg8kj085.js";import{Qt}from"./chunk-tctdn4kk.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Wt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function li({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Wt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Wt,{label:et(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Wt,{label:et(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Zt({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(li,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Qt,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(we,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
2
+ export{Wt,li,Zt};
@@ -1,2 +1,2 @@
1
- import{g}from"./chunk-atdygnc5.js";import{e}from"./chunk-tac30kkh.js";import{p}from"./chunk-pae53dz2.js";import{isTauri as B}from"@tauri-apps/api/core";import{getCurrentWebview as L}from"@tauri-apps/api/webview";import{useEffect as T,useLayoutEffect as M,useRef as q}from"react";import{flushSync as w}from"react-dom";var z=33554432,F=new WeakMap;function R(i){return i.split(/[/\\]/).findLast((f)=>f!=="")??i}var pn={sourcePath:(i)=>F.get(i),uniqueFiles(i,f){let h=new Set(f.map((m)=>m.sourcePath));return i.filter((m)=>{let d=F.get(m);if(d===void 0)return!0;if(h.has(d))return!1;return h.add(d),!0})}};function mn({sessionId:i,enabled:f,onMention:h,onBusyChange:m}){let d=g(),{host:A}=e(),a=q({sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A});return M(()=>{a.current={sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A}}),T(()=>{if(!B())return;let u=!1,x,C=Promise.resolve(),b=0,y=()=>!u&&a.current.sessionId===i&&a.current.enabled,P=(n)=>{let{host:o}=a.current;if(o.reportError)o.reportError(n);else console.error(n)},D=()=>P(Error(a.current.host.t("composer.dropUnavailable")));a.current.onBusyChange(!1);let k=(n)=>{b++,w(()=>a.current.onBusyChange(!0)),C=C.then(async()=>{try{let o=new Set(a.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await n())){let s=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){w(()=>a.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let l=typeof t==="string"?t:await p.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await p.readDroppedFile({path:l});if(!y())return;if(c.image===null)w(()=>a.current.onMention(c.path));else if(!o.has(c.path)){let E=Uint8Array.from(atob(c.image.data),(v)=>v.charCodeAt(0)),r=new File([E],c.name,{type:c.image.mimeType});F.set(r,c.path),o.add(c.path),w(()=>a.current.attachments.add([r]))}}catch(l){if(!u)P(Object.assign(Error(a.current.host.t("composer.dropFailed",{name:R(s)})),{description:l instanceof Error?l.message:String(l)}))}}}finally{if(b--,!u)w(()=>a.current.onBusyChange(b>0))}}).catch((o)=>{if(!u)P(o)})},W=L().onDragDropEvent((n)=>{if(u||n.payload.type!=="drop")return;let{paths:o,position:t}=n.payload,s=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!s?.closest("[data-chat-drop-zone]")||s.closest('[role="dialog"]'))return;if(!y()){D();return}k(()=>Promise.resolve(o))}),S=(n)=>{let o=n.target;if(!(o instanceof Element)||!o.matches("[data-chat-input]"))return;if(!o.closest("[data-chat-drop-zone]")||o.closest('[role="dialog"]'))return;let t=n.clipboardData;if(!t)return;let s=[...t.files??[]],l=[...t.items??[]];if(!(t.types.includes("Files")&&!s.length&&!l.some((r)=>r.type.startsWith("image/")))&&!s.some((r)=>!r.type.startsWith("image/"))&&!l.some((r)=>r.kind==="file"&&!r.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((r)=>t.types.includes(r)&&/^file:\/\//m.test(t.getData(r))))return;if(n.preventDefault(),n.stopPropagation(),!y()){D();return}let E=p.clipboardFilePaths().then((r)=>({value:r}),(r)=>({error:r}));k(async()=>{let r=await E;if("error"in r)throw r.error;let v=r.value;if(v.length)return v;if(s.length)return s;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",S,!0),W.then((n)=>{if(u)n();else x=n}).catch((n)=>{if(!u)P(n)}),()=>{u=!0,document.removeEventListener("paste",S,!0),x?.()}},[i]),null}
2
- export{pn,mn};
1
+ import{g}from"./chunk-xk0dt0es.js";import{e}from"./chunk-bshgrwe9.js";import{u}from"./chunk-jydhbkm8.js";import{isTauri as B}from"@tauri-apps/api/core";import{getCurrentWebview as L}from"@tauri-apps/api/webview";import{useEffect as T,useLayoutEffect as M,useRef as q}from"react";import{flushSync as w}from"react-dom";var z=33554432,F=new WeakMap;function R(i){return i.split(/[/\\]/).findLast((f)=>f!=="")??i}var vn={sourcePath:(i)=>F.get(i),uniqueFiles(i,f){let h=new Set(f.map((m)=>m.sourcePath));return i.filter((m)=>{let d=F.get(m);if(d===void 0)return!0;if(h.has(d))return!1;return h.add(d),!0})}};function yn({sessionId:i,enabled:f,onMention:h,onBusyChange:m}){let d=g(),{host:A}=e(),a=q({sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A});return M(()=>{a.current={sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A}}),T(()=>{if(!B())return;let l=!1,x,C=Promise.resolve(),b=0,y=()=>!l&&a.current.sessionId===i&&a.current.enabled,P=(n)=>{let{host:o}=a.current;if(o.reportError)o.reportError(n);else console.error(n)},D=()=>P(Error(a.current.host.t("composer.dropUnavailable")));a.current.onBusyChange(!1);let k=(n)=>{b++,w(()=>a.current.onBusyChange(!0)),C=C.then(async()=>{try{let o=new Set(a.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await n())){let s=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){w(()=>a.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let p=typeof t==="string"?t:await u.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await u.readDroppedFile({path:p});if(!y())return;if(c.image===null)w(()=>a.current.onMention(c.path));else if(!o.has(c.path)){let E=Uint8Array.from(atob(c.image.data),(v)=>v.charCodeAt(0)),r=new File([E],c.name,{type:c.image.mimeType});F.set(r,c.path),o.add(c.path),w(()=>a.current.attachments.add([r]))}}catch(p){if(!l)P(Object.assign(Error(a.current.host.t("composer.dropFailed",{name:R(s)})),{description:p instanceof Error?p.message:String(p)}))}}}finally{if(b--,!l)w(()=>a.current.onBusyChange(b>0))}}).catch((o)=>{if(!l)P(o)})},W=L().onDragDropEvent((n)=>{if(l||n.payload.type!=="drop")return;let{paths:o,position:t}=n.payload,s=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!s?.closest("[data-chat-drop-zone]")||s.closest('[role="dialog"]'))return;if(!y()){D();return}k(()=>Promise.resolve(o))}),S=(n)=>{let o=n.target;if(!(o instanceof Element)||!o.matches("[data-chat-input]"))return;if(!o.closest("[data-chat-drop-zone]")||o.closest('[role="dialog"]'))return;let t=n.clipboardData;if(!t)return;let s=[...t.files??[]],p=[...t.items??[]];if(!(t.types.includes("Files")&&!s.length&&!p.some((r)=>r.type.startsWith("image/")))&&!s.some((r)=>!r.type.startsWith("image/"))&&!p.some((r)=>r.kind==="file"&&!r.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((r)=>t.types.includes(r)&&/^file:\/\//m.test(t.getData(r))))return;if(n.preventDefault(),n.stopPropagation(),!y()){D();return}let E=u.clipboardFilePaths().then((r)=>({value:r}),(r)=>({error:r}));k(async()=>{let r=await E;if("error"in r)throw r.error;let v=r.value;if(v.length)return v;if(s.length)return s;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",S,!0),W.then((n)=>{if(l)n();else x=n}).catch((n)=>{if(!l)P(n)}),()=>{l=!0,document.removeEventListener("paste",S,!0),x?.()}},[i]),null}
2
+ export{vn,yn};
@@ -0,0 +1,2 @@
1
+ import{Ae}from"./chunk-ffs5nkt0.js";import{r,J,mn}from"./chunk-rzxnxj25.js";var zi=5000;function Ye(t){return"pastedText"in t}function vt(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;J(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Ae(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),mn(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function pn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<zi)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};J(e,(i)=>[...i,o]),vt(e,o,n)}
2
+ export{zi,Ye,vt,pn};
@@ -1,2 +1,2 @@
1
- function Nt({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
2
- export{Nt};
1
+ function Ft({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
2
+ export{Ft};
@@ -1,2 +1,2 @@
1
- import{g}from"./chunk-atdygnc5.js";import{e}from"./chunk-tac30kkh.js";import{mt}from"./chunk-sm16wn9x.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Gi({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=g(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>mt(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
1
+ import{g}from"./chunk-xk0dt0es.js";import{e}from"./chunk-bshgrwe9.js";import{vt}from"./chunk-1smyy9mt.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Gi({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=g(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>vt(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
2
  export{Gi};
@@ -1,2 +1,2 @@
1
- import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function za(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function ea(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function Va(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function ns({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>za(e),[e]),[m,u]=A(()=>ea(c));D(()=>u(ea(c)),[n,c]);let g=c.every((a)=>Va(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
2
- export{za,ea,Va,ns};
1
+ import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Ra(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function Ws(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function La(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Qi({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>Ra(e),[e]),[m,u]=A(()=>Ws(c));D(()=>u(Ws(c)),[n,c]);let g=c.every((a)=>La(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
2
+ export{Ra,Ws,La,Qi};
@@ -0,0 +1,2 @@
1
+ function He(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function Hr(a){if(a.shiftKey||a.altKey)return!1;return He()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
+ export{He,Hr};
@@ -1,2 +1,2 @@
1
- import{mr}from"./chunk-7e9s642q.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function pr({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(mr,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
2
- export{pr};
1
+ import{ls}from"./chunk-x621s275.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function as({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(ls,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
2
+ export{as};
@@ -1,2 +1,2 @@
1
- var Bn={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};
2
- export{Bn};
1
+ var Un={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};
2
+ export{Un};
@@ -0,0 +1,2 @@
1
+ function Fa(e,n){if(e.type||!n.type)return e;let i=n.type.split("/")[1],o=i!==void 0&&i!==""?`pasted-${Date.now()}.${i==="jpeg"?"jpg":i}`:"";return new File([e],e.name||o||`pasted-${Date.now()}`,{type:n.type})}function kt(e){let n=[],i=!1;for(let o of e){if(o.kind!=="file")continue;let t=o.getAsFile();if(!t)continue;if(!(t.type||o.type).startsWith("image/")){i=!0;continue}n.push(Fa(t,o))}return{imageFiles:n,sawNonImageFile:i}}function St(e){return[...e].some((n)=>n.kind==="string")}var s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g;function Ln(e){return e.replace(s,"")}function ea(e,n){let i=0;for(let o=0;o<n;o++){let t=e.charCodeAt(o);if(t>=0&&t<=8||t===11||t===12||t>=14&&t<=31||t===127)i++}return i}function Dn(e){let{value:n,selectionStart:i,selectionEnd:o}=e,t=Ln(n);if(t===n)return t;if(e.value=t,i!==null&&o!==null){let a=Math.max(0,i-ea(n,i)),r=Math.max(0,o-ea(n,o));requestAnimationFrame(()=>{e.setSelectionRange(a,r)})}return t}
2
+ export{Fa,kt,St,Ln,ea,Dn};
@@ -1,2 +1,2 @@
1
- var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function mo(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
2
- export{mo};
1
+ var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function So(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
2
+ export{So};
@@ -0,0 +1,2 @@
1
+ import{u}from"./chunk-jydhbkm8.js";async function Qs(a){let e=await u.previewFile({path:a});if(e.kind!=="image")throw Error("Image preview is unavailable");return`data:${e.mimeType};base64,${e.data}`}
2
+ export{Qs};
@@ -0,0 +1,3 @@
1
+ import{Ji}from"./chunk-9ts08sma.js";import{Qi}from"./chunk-2fx3qhyb.js";import{Zi}from"./chunk-az3g3a94.js";import{Lt}from"./chunk-dypeezvv.js";import{o}from"./chunk-f9z37ptq.js";import{e}from"./chunk-bshgrwe9.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ke(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let n=t._meta?.codex;if(typeof n!=="object"||n===null)return null;let s=n.description;return typeof s==="string"?s:null}function A(t){let n=t.rawInput;if(typeof n!=="object"||n===null)return null;let s=n.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let n of t.content??[])if(g(n)&&n.patch&&n.patch.text.length>0)return n.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((n)=>h(n.content)?n.content.text:"").filter((n)=>n.length>0).join(`
2
+ `)}function T({subject:t,requestTitle:n}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==n&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted max-h-80 overflow-auto overscroll-contain rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Lt,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,n){let{host:s,client:r}=e();return(l)=>{try{if(n)n(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Ji,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:n,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function dt({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s),i=o((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Qi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:n,t:r.t,onRespond:l})}function we({action:t,total:n,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:n,onRespond:s});if(Ke(t))return a(dt,{action:t,total:n??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Zi,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
3
+ export{Ke,dt,we};
@@ -1,2 +1,2 @@
1
- import{qr}from"./chunk-dgh0750h.js";import{jsx as o}from"react/jsx-runtime";function In(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:qr}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function $r(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function z({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:$r(t)})})}
2
- export{In,$r,z};
1
+ import{pi}from"./chunk-8h4e3654.js";import{jsx as o}from"react/jsx-runtime";function Yt(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:pi}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function ci(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function B({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:ci(t)})})}
2
+ export{Yt,ci,B};
@@ -1,4 +1,4 @@
1
- import{H}from"./chunk-05eftctr.js";import{Ao,u,_,vn,Eo,yt}from"./chunk-2b7fjev1.js";import{Sr,Mo,_r,No}from"./chunk-xnj05nc3.js";import{Ct,wt,yn}from"./chunk-fwk2ayca.js";import{fe,g}from"./chunk-atdygnc5.js";import{cn as J}from"cn";import{forwardRef as q,useImperativeHandle as z,useLayoutEffect as O,useRef as d}from"react";import{jsx as j}from"react/jsx-runtime";var U=(r,E)=>r.text===E.text&&JSON.stringify(r.apps)===JSON.stringify(E.apps),To=q((r,E)=>{let I=fe(),L=g(),s=d(null),N=d(null),a=d(_(u({text:I.textInput.value,apps:r.applications}))),f=d({start:r.initialCaret??u(a.current).length,end:r.initialCaret??u(a.current).length}),h=d(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),S=d([]),R=d(""),A=d(r.skillIcon),b=d(!1),x=d(!1),P=d(null),c=d({props:r,controller:I,attachments:L});c.current={props:r,controller:I,attachments:L};let m=()=>{if(s.current&&document.activeElement===s.current)f.current=_r(s.current,a.current.apps,f.current);return f.current},w=()=>{let e=s.current;if(!e)return;let t={...f.current};e.focus(),f.current=t,No(e,t)},T=()=>({...a.current,selection:m()}),D=(e,t)=>{if(!s.current)return;if(Sr(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),A.current=c.current.props.skillIcon,R.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),f.current=t,document.activeElement===s.current)No(s.current,t)},C=(e,t,n=!0,l=!0)=>{if(l&&!U(a.current,e)){if(h.current.push(P.current??T()),h.current.length>100)h.current.shift();S.current=[]}if(P.current=null,a.current=e,f.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},y=(e)=>{let t=m(),n=u(a.current),l=u(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((k)=>typeof k==="string"?[]:[k.id])),p=l.filter((k)=>typeof k==="string"||!i.has(k.id)),o=_([...n.slice(0,t.start),...p,...n.slice(t.end)]),M=t.start+p.length;C(o,{start:M,end:M})},K=(e)=>{let n=(e?h.current:S.current).pop();if(!n)return;(e?S.current:h.current).push(T()),C({text:n.text,apps:n.apps},n.selection,!0,!1)},v=()=>{if(!s.current)return;let e=_(Mo(s.current,a.current.apps)),t=m();if(b.current)return;let n=yn(e.text),l=n===e.text?e:_(u({text:n,apps:e.apps}));C(l,t,n!==e.text)};O(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=_(u({text:i,apps:a.current.apps})),D(a.current,f.current)}},selectionStart:{configurable:!0,get:()=>vn(u(a.current),m().start)},selectionEnd:{configurable:!0,get:()=>vn(u(a.current),m().end)},setSelectionRange:{configurable:!0,value:(i,p)=>{let o=u(a.current);f.current={start:Eo(o,i),end:Eo(o,p)},D(a.current,f.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),N.current=e,D(a.current,f.current),w();let n=()=>{m()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(b.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),K(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),y({text:`
2
- `,apps:[]});else P.current=T()};return e.addEventListener("beforeinput",l),e.addEventListener("change",v),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",v),document.removeEventListener("selectionchange",n),N.current=null}},[]),O(()=>{if(b.current)return;let e=_(u({text:I.textInput.value,apps:r.applications}));if(U(e,a.current)&&R.current===JSON.stringify(r.skillNames??[])&&A.current===r.skillIcon)return;let t=m();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),z(E,()=>({focus:w,getTextarea:()=>N.current,isComposing:()=>b.current||x.current,resetHeight:()=>{h.current=[],S.current=[]},insertInvocation:(e)=>{w(),y({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(w(),a.current.apps.some((t)=>t.id===e.id))return;y({text:"",apps:[{...e,offset:0}]})}}),[]);let F=(e)=>{if(b.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),K(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)y({text:`
3
- `,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=m(),n=u(a.current);if(t.start!==t.end){e.preventDefault(),y({text:"",apps:[]});return}let l=vn(n,t.start),i=H(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);C(_([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let p=e.key==="Backspace"?t.start-1:t.start;if(p>=0&&p<n.length&&typeof n[p]!=="string")e.preventDefault(),C(_([...n.slice(0,p),...n.slice(p+1)]),{start:p,end:p});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o)e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},B=(e)=>{let t=m();if(t.start===t.end)return;let n=u(a.current).slice(t.start,t.end),l=_(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(Ao,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)y({text:"",apps:[]})};return j("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:J("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:v,onKeyDown:F,onCompositionStart:()=>{P.current=T(),b.current=!0,x.current=!1},onCompositionEnd:()=>{b.current=!1,v(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=Ct(e.clipboardData.items);if(e.preventDefault(),t.length){L.add(t);return}if(n&&!wt(e.clipboardData.items))return;y(yt(e.clipboardData)??{text:yn(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:B,onCut:B,onDrop:(e)=>{e.preventDefault()}})});To.displayName="PromptInputInline";
4
- export{To};
1
+ import{U}from"./chunk-542c9tpr.js";import{xo,p,_,Rn,bo,Ct}from"./chunk-11vn501z.js";import{cr,vo,dr,yo}from"./chunk-4fmn1kk4.js";import{kt,St,Ln}from"./chunk-36ttr22w.js";import{he,g}from"./chunk-xk0dt0es.js";import{cn as J}from"cn";import{forwardRef as q,useImperativeHandle as z,useLayoutEffect as M,useRef as d}from"react";import{jsx as j}from"react/jsx-runtime";var O=(r,E)=>r.text===E.text&&JSON.stringify(r.apps)===JSON.stringify(E.apps),go=q((r,E)=>{let I=he(),L=g(),s=d(null),N=d(null),a=d(_(p({text:I.textInput.value,apps:r.applications}))),f=d({start:r.initialCaret??p(a.current).length,end:r.initialCaret??p(a.current).length}),h=d(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),S=d([]),H=d(""),R=d(r.skillIcon),b=d(!1),x=d(!1),P=d(null),c=d({props:r,controller:I,attachments:L});c.current={props:r,controller:I,attachments:L};let m=()=>{if(s.current&&document.activeElement===s.current)f.current=dr(s.current,a.current.apps,f.current);return f.current},w=()=>{let e=s.current;if(!e)return;let t={...f.current};e.focus(),f.current=t,yo(e,t)},T=()=>({...a.current,selection:m()}),D=(e,t)=>{if(!s.current)return;if(cr(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),R.current=c.current.props.skillIcon,H.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),f.current=t,document.activeElement===s.current)yo(s.current,t)},C=(e,t,n=!0,l=!0)=>{if(l&&!O(a.current,e)){if(h.current.push(P.current??T()),h.current.length>100)h.current.shift();S.current=[]}if(P.current=null,a.current=e,f.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},y=(e)=>{let t=m(),n=p(a.current),l=p(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((k)=>typeof k==="string"?[]:[k.id])),u=l.filter((k)=>typeof k==="string"||!i.has(k.id)),o=_([...n.slice(0,t.start),...u,...n.slice(t.end)]),B=t.start+u.length;C(o,{start:B,end:B})},A=(e)=>{let n=(e?h.current:S.current).pop();if(!n)return;(e?S.current:h.current).push(T()),C({text:n.text,apps:n.apps},n.selection,!0,!1)},v=()=>{if(!s.current)return;let e=_(vo(s.current,a.current.apps)),t=m();if(b.current)return;let n=Ln(e.text),l=n===e.text?e:_(p({text:n,apps:e.apps}));C(l,t,n!==e.text)};M(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=_(p({text:i,apps:a.current.apps})),D(a.current,f.current)}},selectionStart:{configurable:!0,get:()=>Rn(p(a.current),m().start)},selectionEnd:{configurable:!0,get:()=>Rn(p(a.current),m().end)},setSelectionRange:{configurable:!0,value:(i,u)=>{let o=p(a.current);f.current={start:bo(o,i),end:bo(o,u)},D(a.current,f.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),N.current=e,D(a.current,f.current),w();let n=()=>{m()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(b.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),A(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),y({text:`
2
+ `,apps:[]});else P.current=T()};return e.addEventListener("beforeinput",l),e.addEventListener("change",v),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",v),document.removeEventListener("selectionchange",n),N.current=null}},[]),M(()=>{if(b.current)return;let e=_(p({text:I.textInput.value,apps:r.applications}));if(O(e,a.current)&&H.current===JSON.stringify(r.skillNames??[])&&R.current===r.skillIcon)return;let t=m();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),z(E,()=>({focus:w,getTextarea:()=>N.current,isComposing:()=>b.current||x.current,resetHeight:()=>{h.current=[],S.current=[]},insertInvocation:(e)=>{w(),y({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(w(),a.current.apps.some((t)=>t.id===e.id))return;y({text:"",apps:[{...e,offset:0}]})}}),[]);let F=(e)=>{if(b.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),A(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)y({text:`
3
+ `,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=m(),n=p(a.current);if(t.start!==t.end){e.preventDefault(),y({text:"",apps:[]});return}let l=Rn(n,t.start),i=U(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);C(_([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let u=e.key==="Backspace"?t.start-1:t.start;if(u>=0&&u<n.length&&typeof n[u]!=="string")e.preventDefault(),C(_([...n.slice(0,u),...n.slice(u+1)]),{start:u,end:u});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o)e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},K=(e)=>{let t=m();if(t.start===t.end)return;let n=p(a.current).slice(t.start,t.end),l=_(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(xo,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)y({text:"",apps:[]})};return j("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:J("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:v,onKeyDown:F,onCompositionStart:()=>{P.current=T(),b.current=!0,x.current=!1},onCompositionEnd:()=>{b.current=!1,v(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=kt(e.clipboardData.items);if(e.preventDefault(),t.length){L.add(t);return}if(n&&!St(e.clipboardData.items))return;y(Ct(e.clipboardData)??{text:Ln(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:K,onCut:K,onDrop:(e)=>{e.preventDefault()}})});go.displayName="PromptInputInline";
4
+ export{go};